Sync Rejected Orders
🗺️ Sync Rejected Order Request
| Field | Details |
|---|---|
| API Name | SyncRejectedOrders |
| URL Format | <protocol>://<domain name:port>/<VirtualDir>/<URL> |
| Example URL | https://localhost:8080/OTPA/V1/SyncRejectedOrderDetails |
| Description | This request retrieves all rejected orders available in the system. Upon receiving this request, the system sends state-based rejected order information messages. The request must include jToken received from the Authentication API response. |
🎯 Sync Rejected Order Request Parameters
| Parameter | Data Type | Description |
|---|---|---|
| jMessageType | varchar(15) | Must be sent as SYNC_ORDER_REQ |
| jManagerID | varchar(50) | Manager Identification Number |
| jCustomerId | varchar(50) | Customer ID assigned to the user |
| jExchange | int | Exchange identifier |
| jToken | varchar(512) | Authentication token received from the Authentication API |
| jEntrySequenceNumber | int64 | Last received sequence number; defaults to 0 if not provided |
| jRequestID | varchar(255) | Echo‑back field |
Example Sync Rejected Order Request
{
"jMessageType": "SYNC_ORDER_REQ",
"jManagerID": "<MANAGER1>",
"jCustomerId": "<MEMBER>",
"jToken": "<Token received in the Authentication Response>",
"jEntrySequenceNumber": "<max sequence no>",
"jRequestID": "<Echo back field>"
}
📘 Sync Rejected Order Response
The response contains the following parameters:
| Parameter | Data Type | Description |
|---|---|---|
| jManagerId | varchar(50) | User ID assigned to the user |
| jCustomerId | varchar(50) | Customer ID assigned to the user |
| jLastSyncedPacket | int | Indicates if this is the last packet (1 = last packet) |
| jNoOfRecords | int | Number of rejected order records |
| jOrderMessage | Order Detail Structure (array) | Array of rejected order messages with size equal to jNoOfRecords |
| jRequestID | varchar(255) | Echo back field |
| jResponseID | varchar(255) | System‑generated alphanumeric ID |
📄 Rejected Order Detail Structure
Each entry inside jOrderMessage contains the following parameters:
| Parameter (Key) | Data Type | Description |
|---|---|---|
| Order Number | int | Unique order number |
| Cli Order Number | int | Gateway/Client order number (system‑generated) |
| Exchange | varchar(10) | Exchange |
| Scrip Token | int | Scrip token |
| Symbol | float | Exchange‑provided security scrip name |
| Series | varchar(3) | Exchange‑provided security series |
| InstrumentName | varchar(20) | Instrument name. Valid values: • Equity = blank • Future Index = FUTIDX • Interest Rate Future = FUTINT • Future Stock = FUTSTK • Option Index = OPTIDX • Option Stock = OPTSTK • MCX/NCDEX Futures = FUTCOM • MCX Spot = COM • NCDEX Spot = COMDTY • NSE Currency Future = FUTCUR, FUTIRD, FUTIRT, OPTCUR • NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT |
| Expiry Date | varchar(10) | Expiry date (ddMMMyyyy, e.g., 24JUN2004). Applicable for F&O only; blank otherwise. |
| Strike Price | float | Strike price (in rupees). Applicable for options only; otherwise -1. |
| Option Type | varchar(2) | Option type. Applicable for options only; blank otherwise. |
| Buy Sell | int | Buy/Sell flag: • 1 → Buy• 2 → Sell |
| Order Original Qty | int | Original order quantity |
| Pending Qty | int | Pending quantity |
| TradedQTY | int | Traded quantity |
| DQ | int | Disclosed quantity |
| Order Price | float | Order price (in rupees) |
| Trigger Price | float | Trigger price (in rupees) |
| Order Type | varchar(10) | Order type |
| Order Status | varchar(15) | Rejected order status |
| Reason | varchar(300) | Rejection reason |
| Order Validity | varchar(100) | Order validity |
| Pro/Cli | int | Participant type: • 1 → CLI• 2 → PRO |
| User ID | varchar(10) | Client code (blank for PRO users) |
| DealerCode | varchar(5) | Unique user identification code |
| Part Code | varchar(12) | Participant code; otherwise blank |
| Order Entry Time | varchar(10) | Order entry timestamp (e.g., 15Jun2018 15.25.15) |
| Last Modified Time | varchar(10) | Last modified timestamp (e.g., 15Jun2018 15.25.15) |
| Alias | varchar(5) | Alias ID; blank if not applicable |
| Product | varchar(5) | Product type of the order |
| Initiated By | varchar(25) | Application from which the order was initiated (e.g., ADMIN, NET) |
| Modified By | varchar(25) | Application from which the order was modified |
| Initiated By User Id | varchar(10) | User ID that initiated the order |
| Modified By User Id | varchar(10) | User ID that modified the order |
| Leg Indicator | int | Spread leg indicator |
| LocationID | varchar(5) | Location ID (PIN + NSECTCLBRANCH ID + NSECTCLID + ALGO FLAG + VENDOR CODE) |
| User Remarks | varchar(50) | User-provided remarks |
| Misc | varchar(50) | Miscellaneous values: • SPO-LMT• SPO-MKT• PO-MKT• PO-LMT |
| SpreadFlag | int | Spread flag: • 1 → Spread• 0 → Normal |
| Spread Price | float | Spread price (in rupees) |
| AMO Order ID | varchar(50) | Order ID for AMO / EQGTD orders; otherwise blank |
| SequenceNo | int64 | Incremental sequence number |
| ManagerId | int | Manager ID |
| Days | int | Number of days |
| UniqueCode | varchar(12) | Alphanumeric value with special characters |
Example Response
{
"jData": {
"ManagerID": "KOTAL_10.0.0.1",
"CustomerId": "KOTAK",
"NoOfRecords": 6,
"OrderDetail": [
{ "MessageCode": 2000, "OrderNumber": 1, "...": "..." },
{ "MessageCode": 2000, "OrderNumber": 2, "...": "..." },
{ "MessageCode": 2000, "OrderNumber": 3, "...": "..." },
{ "MessageCode": 2000, "OrderNumber": 4, "...": "..." },
{ "MessageCode": 2000, "OrderNumber": 5, "...": "..." },
{ "MessageCode": 2000, "OrderNumber": 6, "...": "..." }
]
}
}